package com.opgea.crm.domain.entities;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@Entity
@Table(name="projectestimationhistory")
public class ProjectEstimationHistory implements Serializable {

	@Id
	@GeneratedValue
	@Column(name="id")
	private Long id;
	
	@Column(name="estimatedStartDate")
	@Temporal(TemporalType.DATE)
	private Date estimatedStartDate;
	
	@Column(name="estimatedEndDate")
	@Temporal(TemporalType.DATE)
	private Date estimatedEndDate;
	
	@Column(name="estimatedProjectBudget")
	private Double estimatedProjectBudget;
	
	@Column(name="estimatedProjectHrs")
	private Integer estimatedProjectHrs;
	
	@Column(name="budgetVariation")
	private Float budgetVariation;
	
	@Column(name="hrsVariation")
	private Float hrsVariation;
	
	@JoinColumn(name="estimatedBy", referencedColumnName="id")
	private Employee estimatedBy;
	
	@Column(name="estimatedAt")
	@Temporal(TemporalType.DATE)
	private Date estimatedAt;
	
	
	@ManyToOne
	@JoinColumn(name="project_id", referencedColumnName="id")
	private ProjectDetails project;
	
	@Column(name="note")
	private String note;
	
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public Date getEstimatedStartDate() {
		return estimatedStartDate;
	}
	public void setEstimatedStartDate(Date estimatedStartDate) {
		this.estimatedStartDate = estimatedStartDate;
	}
	public Date getEstimatedEndDate() {
		return estimatedEndDate;
	}
	public void setEstimatedEndDate(Date estimatedEndDate) {
		this.estimatedEndDate = estimatedEndDate;
	}
	public Double getEstimatedProjectBudget() {
		return estimatedProjectBudget;
	}
	public void setEstimatedProjectBudget(Double estimatedProjectBudget) {
		this.estimatedProjectBudget = estimatedProjectBudget;
	}
	public Integer getEstimatedProjectHrs() {
		return estimatedProjectHrs;
	}
	public void setEstimatedProjectHrs(Integer estimatedProjectHrs) {
		this.estimatedProjectHrs = estimatedProjectHrs;
	}
	public Float getBudgetVariation() {
		return budgetVariation;
	}
	public void setBudgetVariation(Float budgetVariation) {
		this.budgetVariation = budgetVariation;
	}
	public Float getHrsVariation() {
		return hrsVariation;
	}
	public void setHrsVariation(Float hrsVariation) {
		this.hrsVariation = hrsVariation;
	}
	public Employee getEstimatedBy() {
		return estimatedBy;
	}
	public void setEstimatedBy(Employee estimatedBy) {
		this.estimatedBy = estimatedBy;
	}
	public Date getEstimatedAt() {
		return estimatedAt;
	}
	public void setEstimatedAt(Date estimatedAt) {
		this.estimatedAt = estimatedAt;
	}
	public ProjectDetails getProject() {
		return project;
	}
	public void setProject(ProjectDetails project) {
		this.project = project;
	}
	public String getNote() {
		return note;
	}
	public void setNote(String note) {
		this.note = note;
	}
	@Override
	public String toString() {
		return "ProjectEstimationHistory [budgetVariation=" + budgetVariation
				+ ", estimatedAt=" + estimatedAt + ", estimatedBy="
				+ estimatedBy + ", estimatedEndDate=" + estimatedEndDate
				+ ", estimatedProjectBudget=" + estimatedProjectBudget
				+ ", estimatedProjectHrs=" + estimatedProjectHrs
				+ ", estimatedStartDate=" + estimatedStartDate
				+ ", hrsVariation=" + hrsVariation + ", id=" + id + ", note="
				+ note + ", project=" + project + "]";
	}
	
	
}
